package entity;

import java.io.Serializable;
import java.util.Optional;

public class User implements Serializable {

    // 年龄
    private Integer age;

    // 性别
    private String sex;

    // 姓名
    private String name;

    // 住址
    private String address;

    public User() {

    }

    public User(Integer age, String sex, String name, String address) {
        this.age = age;
        this.sex = sex;
        this.name = name;
        this.address = address;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Optional<String> getAddress() {
        return Optional.ofNullable(address);
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
